import 'package:massagist/generated/json/base/json_convert_content.dart';
import 'package:massagist/models/path_model_entity.dart';

PathModelEntity $PathModelEntityFromJson(Map<String, dynamic> json) {
	final PathModelEntity pathModelEntity = PathModelEntity();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		pathModelEntity.id = id;
	}
	final String? line = jsonConvert.convert<String>(json['line']);
	if (line != null) {
		pathModelEntity.line = line;
	}
	final String? icon = jsonConvert.convert<String>(json['icon']);
	if (icon != null) {
		pathModelEntity.icon = icon;
	}
	final List<PathModelUsers>? users = jsonConvert.convertListNotNull<PathModelUsers>(json['users']);
	if (users != null) {
		pathModelEntity.users = users;
	}
	return pathModelEntity;
}

Map<String, dynamic> $PathModelEntityToJson(PathModelEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['line'] = entity.line;
	data['icon'] = entity.icon;
	data['users'] =  entity.users.map((v) => v.toJson()).toList();
	return data;
}

PathModelUsers $PathModelUsersFromJson(Map<String, dynamic> json) {
	final PathModelUsers pathModelUsers = PathModelUsers();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		pathModelUsers.id = id;
	}
	final String? icon = jsonConvert.convert<String>(json['icon']);
	if (icon != null) {
		pathModelUsers.icon = icon;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		pathModelUsers.name = name;
	}
	final int? age = jsonConvert.convert<int>(json['age']);
	if (age != null) {
		pathModelUsers.age = age;
	}
	final int? height = jsonConvert.convert<int>(json['height']);
	if (height != null) {
		pathModelUsers.height = height;
	}
	final String? sex = jsonConvert.convert<String>(json['sex']);
	if (sex != null) {
		pathModelUsers.sex = sex;
	}
	final String? introduce = jsonConvert.convert<String>(json['introduce']);
	if (introduce != null) {
		pathModelUsers.introduce = introduce;
	}
	final String? weight = jsonConvert.convert<String>(json['weight']);
	if (weight != null) {
		pathModelUsers.weight = weight;
	}
	final List<String>? scenic = jsonConvert.convertListNotNull<String>(json['scenic']);
	if (scenic != null) {
		pathModelUsers.scenic = scenic;
	}
	final List<String>? others = jsonConvert.convertListNotNull<String>(json['others']);
	if (others != null) {
		pathModelUsers.others = others;
	}
	return pathModelUsers;
}

Map<String, dynamic> $PathModelUsersToJson(PathModelUsers entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['icon'] = entity.icon;
	data['name'] = entity.name;
	data['age'] = entity.age;
	data['height'] = entity.height;
	data['sex'] = entity.sex;
	data['introduce'] = entity.introduce;
	data['weight'] = entity.weight;
	data['scenic'] =  entity.scenic;
	data['others'] =  entity.others;
	return data;
}